package com.lockapp.database;

import android.database.Cursor;
import android.database.sqlite.SQLiteCursor;
import android.database.sqlite.SQLiteCursorDriver;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteQuery;

public class SenhaCursor extends SQLiteCursor {

	public static final String QUERY = "select * from senha";
	
	public SenhaCursor(SQLiteDatabase db, SQLiteCursorDriver driver,
			String editTable, SQLiteQuery query) {
		super(db, driver, editTable, query);
	}
	
	public static class Factory implements CursorFactory{

		@Override
		public Cursor newCursor(SQLiteDatabase db,
				SQLiteCursorDriver masterQuery, String editTable,
				SQLiteQuery query) {
			return new SenhaCursor(db, masterQuery, editTable, query);
		}
	}

	public int getIdSenha(){
		return getInt(getColumnIndexOrThrow("idsenha"));
	}
	
	public int getDigitoUm(){
		return getInt(getColumnIndexOrThrow("digitoum"));
	}
	
	public int getDigitoDois(){
		return getInt(getColumnIndexOrThrow("digitodois"));
	}
	
	public int getDigitoTres(){
		return getInt(getColumnIndexOrThrow("digitotres"));
	}
	
	public int getDigitoQuatro(){
		return getInt(getColumnIndexOrThrow("digitoquatro"));
	}
	
}
